import type { Nullable } from "vitest"

export interface DefaultItemApiResponse<T> {
  id: string | number
  attributes: Nullable<T>
}
export enum ImageSizesEnum {
  Large = "large",
  Small = "small",
  Medium = "medium",
  Thumbnail = "thumbnail",
}
export interface ImageSize {
  ext: string
  url: string
  hash: string
  mime: string
  name: string
  path: string | null
  size: number
  width: number
  height: number
  sizeInBytes: number
}
export interface ImageAttributes {
  name: string
  alternativeText: null
  caption: null
  width: number
  height: number
  hash: string
  ext: string
  mime: string
  size: number
  url: string
  previewUrl: null
  provider: string
  provider_metadata: null
  createdAt: string
  updatedAt: string
  formats: Record<ImageSizesEnum, ImageSize>
}
export interface ImagesResponse {
  data: DefaultItemApiResponse<ImageAttributes>[]
}
export interface ImageResponse {
  data: DefaultItemApiResponse<ImageAttributes>
}
